#include<stdio.h>
#include<malloc.h>
#include "2dDynamicArray.h"
void main(){
	int i, j;
	int Element = 0;
	int value = 0;
	struct TypeOfArray Struct;
	struct TypeOfArray Struct2;
	
	Struct.size = sizeof(int);
	Struct2.size = sizeof(int);

	
	



	///////////////////////////
	create(&Struct, 5, 5, Struct.size);
	create(&Struct2, 3, 3, Struct2.size);
	
	for(i = 0; i < Struct.NumberOfRows; i++){
		for(j = 0; j < Struct.NumberOfColumns; j++){
			set(&Struct, i, j, &value);
		}
	}
	
	print(&Struct);

	for(i = 0; i < Struct2.NumberOfRows; i++){
		for(j = 0; j < Struct2.NumberOfColumns; j++){
			set(&Struct2, i, j, &value);
		}
	}
	print(&Struct2);

	value = 5;
	set(&Struct, 0, 0, &value);
	set(&Struct2, 1, 1, &value);

	print(&Struct);
	print(&Struct2);

	Element = *(byte*)get(&Struct, 0, 0);
	printf("\n");
	printf("Element ");
	printf("%d\n", Element);

	copy(&Struct,&Struct2,1,1);
	print(&Struct);
	
	printf("\n");
	printf("element with function get ");
	Element = *(byte*)get(&Struct, 2, 2);
	printf("%d\n", Element);

	resize(&Struct, 6, 6);
	print(&Struct);

	destroy(&Struct);
	destroy(&Struct2);
	
	getchar();
}